import request from '@/utils/request'
// 创建
export function createOne(data) {
    return request({
        url: '/cms/categories',
        method: 'post',
        data: data
    })
}
// 删除
export function deleteOne(id) {
    return request({
        url: '/cms/categories/' + id,
        method: 'delete'
    })
}
// 修改
export function updateOne(data) {
    return request({
        url: '/cms/categories',
        method: 'put',
        data: data
    })
}
// 查询
export function queryList(query) {
    return request({
        url: '/cms/categories',
        method: 'get',
        params: query
    })
}

export function queryOne(id) {
    return request({
        url: '/cms/categories/' + id,
        method: 'get'
    })
}